import Vue from 'vue'
import './plugins/axios'
import './plugins/area'
import App from './App.vue'
import router from './router'
import store from './store'
import './plugins/element.js'
import './assets/css/global.css'
import echarts from 'echarts'
Vue.config.productionTip = false
Vue.prototype.$echarts = echarts
Vue.prototype.$parseDate = parseDate
new Vue({
    router,
    store,
    render: h => h(App)
}).$mount('#app')

function parseDate(ms) {
    if (ms) {
        let parsed = new Date(ms)
        return `${parsed.getFullYear()}-${parsed.getMonth() +
      1}-${parsed.getDate()} ${parsed.getHours()}:${parsed.getMinutes()}`
    }
    return '--/--'
}